﻿var adImg_n = '/shop/templates/default/images/null.png';
var adImg_s = '/shop/templates/default/images/ad_top_s_a90.png';
var adImg_b = '/shop/templates/default/images/ad_top_b_a500.png';
function TopAd(){
	var strTopAd="";
	var topSmallBanner="<div style='background:url("+adImg_s+") top center; height:90px;'><img src='"+adImg_n+"' border=0 /></div>";
	if (location == "http://www.zhaojinyin.com" || location == "http://www.zhaojinyin.com.cn" || location == "http://www.zhaojinyin.cn" || true){
		strTopAd = "<div id=adTop>";
		strTopAd += "<div id=adBig style='display: none;'><div style='background:url("+adImg_b+") top center; height:500px;'><img src='"+adImg_n+"' border=0></div></div>";
		strTopAd += "<div id=adSmall style='display: none'>"+topSmallBanner+"</div>"; 
		strTopAd += "</div>";
	}else{
		strTopAd += topSmallBanner;  
    }
    //strTopAd+="<div style='height:7px; clear:both;overflow:hidden;'></div>";
	return strTopAd;
}
document.write(TopAd());

$(function(){
	if(typeof(ACT)!="undefined" && ACT=='index') {
		showPic();
		//过两秒显示 showImage(); 内容
		setTimeout("showImage();", 3000);
	}else{
		$("#adSmall").show();
	}
});

function showImage(){
    $("#adBig").slideUp(2000,function(){$("#adSmall").slideDown(1000);});
}
function showPic(){
	$("#adSmall").slideUp(1000,function(){$("#adBig").slideDown(2000);});
}

